# 用yield实现协程
import time


def work1():
    while True:
        yield 'jueyi'
        time.sleep(1)


def work2():
    while True:
        yield '绝艺'
        time.sleep(0.5)


if __name__ == '__main__':
    w1 = work1()
    w2 = work2()
    while True:
        print(next(w1))
        print(next(w2))
